<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@page import="cn.edu.nju.ws.sview.Config,java.util.Enumeration" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Log In</title>
<link rel="icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="/sview/css/bootstrap_button.min.css" />
<link rel="stylesheet" type="text/css" href="/sview/css/register.css" />
<link rel="stylesheet" type="text/css" href="/sview/css/login.css" />
<link rel="stylesheet" type="text/css" href="/sview/css/easyui.css" />
<script type="text/javascript" src="/sview/script/jquery.js"></script>
<script type="text/javascript" src="/sview/script/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/sview/script/login.js"></script>
</head>
<body>
<%
     String lang = request.getParameter("lang");
     if(lang!=null &&lang.equals("zh")){
    	 request.getRequestDispatcher("login_zh.jsp").forward(request,response);
    	 return;
     }
%>
<div class="header_bar" style="height:45px;background-color:#000000">
<div class="bar-box">
<img src="/sview/icons/logo_white.png">
<div class="set_language">
   <%
     String location = "/sview/login";
   String from = request.getParameter("from");
   if(from!=null){
  	 from = java.net.URLEncoder.encode(from,"utf-8") ;
  	 location = location+"?from="+from;
   }
   String location_zh ="/sview/login?lang=zh" ;
   if(from!=null)
   		location_zh = location_zh+"&from="+from;
   %>
   <a class="op_lang" href="<%=location%>">English</a>
   <a class="op_lang" href="<%=location_zh%>">中文(简体)</a>
</div>
</div>
</div>
<div id="container" class="container">
   <div class="signHeader"><span class="large">Sign In</span><span class="link">Not registered yet? 
      <%
         String loc = "/sview/register" ;
         if(from!=null){
        	 loc = loc+"?from="+from;
        	 }
      %>
      <a href="<%=loc%>">Sign up</a> 
   </span></div>
   <div id="register_section" class="section login-sect">
        <form action="/sview/login.do" method="post" id="loginForm">
        <div class="fields ">
        	<label>Username</label>
        	<input class='ftext' type="text" name="uid" id="uid"/>
        	<span class="error-msg"></span>
        </div>
        <div class="fields cleft">
        	<label>Password</label>
        	<input type="password" class='ftext' maxlength="20"  name="pwd" id="pwd">
            <span class="error-msg"></span>
        </div>
       <input type='hidden' name="display-lang" id="display-lang" value="en""/>
       <div class="inval-message"></div>
       <div class="operate">
        	<input type='submit' class="form-button btn btn-success" value="Sign in" onClick="return validateCheck();"/>

        </div> 
       <input type='hidden' name="display-lang" id="display-lang" value="en"/>
       <%if(from!=null){ 
        %>
         <input type='hidden' name="from" value="<%=from %>" />
        <%} %>
       </form>
	</div>
	<div id="group_section" class="group_section">
	    <div class="para">
	       <div class="header"><span>Sign in as a member of an editing group:</span></div>
	       <div class="body"></div>
	    </div>
	    <div class="cc_para">  
	        <div class="btnbox">
                 <input type="button"  value="Confirm" class="group-button btn btn-success confirm">
	             <input type="button"  value="Cancel" class="group-button btn cancel">
	     </div>
	    </div>
     </div>
</div>
<jsp:include page="/vfooter.jsp"></jsp:include>
</body>
</html>